<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<%@ include file="/common/meta.jsp" %>
	<meta content="changepassmanage" name="activemenu" />
	<link href="${ctx}/css/base.css" rel="stylesheet" type="text/css" />
	<link href="${ctx}/css/master.css" rel="stylesheet" type="text/css" />
	<script src="${ctx}/js/jquery.js" type="text/javascript"></script>
	<script src="${ctx}/js/table.js" type="text/javascript"></script>
	<link href="${ctx}/validate/jquery.validate.css" type="text/css" rel="stylesheet"/>
	<script src="${ctx}/validate/jquery.validate.js" type="text/javascript"></script>
	<script src="${ctx}/validate/messages_cn.js" type="text/javascript"></script>
	<script>
	$(document).ready(function() {
		$("#inputForm").validate({
			rules: {
				oldPass: {
					required:true,
					minlength:4,
					maxlength:10,
					remote: "${ctx}/modifypass!checkPassWord.action?userId="+${user.id}
				},
				newPass: {
					required:true,
					minlength:4,
					maxlength:10
				},
				passwordConfirm: {
					required: true,
					equalTo: "#newPass"
				}
			},
			messages: {
				oldPass: {
					remote: "密码错误！"
				},
				passwordConfirm: {
					required:"必选字段！",
					equalTo: "与上面密码不一致！"
				}
			},
			errorPlacement: function(error, element) {   
		        if (document.getElementById("error_"+element.attr("name")))  {
		            error.appendTo("#error_"+element.attr("name"));  
		        }
		        else {
		            error.insertAfter(element); 
		        }
		    },
		    errorElement: "strong"
		});
	});
	</script>
</head>
<body>
<jsp:include page="/common/header.jsp" />
	<div class="main_wrap1">
	<div class="main_all">
	<!--左边tab-->
		<div class="left_main">
		  <jsp:include page="/common/menu.jsp" />
		</div>
		<!--左边tab结束-->

<!--右边-->
<div class="right_box">
<div class="top_serach_box"><p class="examination_info">修改密码</p></div>
<!-- head end  -->
<form id="inputForm" action="${ctx}/modifypass.action" method="post" >
	<div class="top_serach_box">
        <ul class="form">
		    <li><label>旧密码</label><input id="oldPass" name="oldPass" type="password" style="width:200px;" /></li>
		    <li><label>新密码</label><input id="newPass" name="newPass" type="password" style="width:200px;" /></li>
		    <li><label>确认密码</label><input id="passwordConfirm" name="passwordConfirm" type="password" style="width:200px;" /></li>
		    </ul>
		<p class="button_box"><input type="submit" value="修改密码" class="btn_red"/>&nbsp;&nbsp;
		<input type="button" value="取    消" onclick="javascript:history.back();" class="btn_red"/>
		</p>
	</div>
</form>
</div>
<!--右边结束-->
</div> <!-- content  end-->
</div><!-- wrapper  end-->  
</body>
</html>